package com.kuaifu.autofare.common.utils;

import java.util.HashMap;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.kuaifu.autofare.common.constants.CommonConstatns;

public class WeixinApiUtils {
	private static final String JSSDK_SIGNATURE_URI = "/jssdk_signture";

	public static JSONObject jssdk_signture(String url, String accountId) throws Exception {
		String apiUrl = CommonConstatns.WX_API_PREFIX_URL + JSSDK_SIGNATURE_URI;
		Map<String, String> params = new HashMap<String, String>();
		params.put("url", url);
		params.put("accountId", accountId);
		String jsonStr = HttpClientUtils.postRequest(apiUrl, params);
		return JSONObject.parseObject(jsonStr);
	}
}
